﻿#ifndef LANGUGEMANAGE_H
#define LANGUGEMANAGE_H

#include <QObject>
#include <QTranslator>
#include <QGuiApplication>
class LangugeManage : public QObject
{
    Q_OBJECT
public:
    Q_PROPERTY(QString changeNofity READ changeNofity WRITE setchangeNofity NOTIFY changeNofityChanged)

    explicit LangugeManage(QObject *parent = nullptr);
    ~LangugeManage();

    static LangugeManage * instance()
        {
            if(m_instance == nullptr)
                m_instance = new LangugeManage(nullptr);

            return m_instance;
        }

    QString m_changeNofity;

    QString changeNofity();
    void setchangeNofity(QString b);

signals:
    void changeNofityChanged();

public slots:
    void changeLanguage(QString lan);

private:
    static LangugeManage *m_instance;
    QTranslator *m_translator;

};


#endif // LANGUGEMANAGE_H
